package com.sitech.portal.bigScreen.dao.ibatis;

import com.sitech.ibnms.core.BaseIbnmsDao;
import com.sitech.ibnms.core.IPage;
import com.sitech.ibnms.core.PageForm;
import com.sitech.portal.bigScreen.dao.ScreenPhysicalDao;
import com.sitech.portal.bigScreen.domain.TbScreenPhysical;

import java.util.Map;

/**
 * Created by Administrator on 2015/4/22.
 */
public class ScreenPhysicalDaoImpl extends BaseIbnmsDao implements ScreenPhysicalDao {
    @Override
    public void addScreenPhysical(TbScreenPhysical tbScreenPhysical) {
        super.insert("addScreenPhysical",tbScreenPhysical);
    }

    @Override
    public IPage queryScreenPhysicalByFilter(String name,PageForm pageForm) {
        return super.findPage("queryScreenPhysicalByFilter",name,pageForm);
    }

    @Override
    public void deleteScreenPhysicalById(String id) {
        super.delete("deleteScreenPhysicalById",id);
    }

    @Override
    public void updateScreenPhysical(TbScreenPhysical tbScreenPhysical) {
        super.update("updateScreenPhysical",tbScreenPhysical);
    }

    @Override
    public void relatedScreenLogicalToPhysical(Map<String, Object> param) {
        super.insert("relatedScreenLogicalToPhysical",param);
    }

    @Override
    public void unrelatedScreenLogicalToPhysical(String physicalScreenId) {
        super.delete("unrelatedScreenLogicalToPhysical", physicalScreenId);
    }

    @Override
    public boolean ifNameExist(TbScreenPhysical tbScreenPhysical) {
        return (Integer)super.querySingle("selectScreenPhysicalCountByNameAndId",tbScreenPhysical)>0?true:false;
    }
}
